package com.yonyou.ucf.mdf.app.isvdxq.other.model;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yonyou.ucf.mdf.app.isvdxq.other.entity.ProductSpecEntity;
import com.yonyou.ucf.mdf.app.isvdxq.other.entity.UnitassistEntity;

import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class ProductMainBean {
    private List<ProductOrgBean> productOrgs;
    private List<UnitassistEntity> productAssistUnitExchanges;
    private List<ProductSpecEntity> productSpecFrees;
    private List<ProductTempSKUBean> productskus;

    public List<ProductSpecEntity> getProductSpecFrees() {
        return productSpecFrees;
    }

    public void setProductSpecFrees(List<ProductSpecEntity> productSpecFrees) {
        this.productSpecFrees = productSpecFrees;
    }

    public List<ProductTempSKUBean> getProductskus() {
        return productskus;
    }

    public void setProductskus(List<ProductTempSKUBean> productskus) {
        this.productskus = productskus;
    }

    //    private List<String> defaultSKUOrderProperties;
//    private List<String> productParams;
//    private List<String> productLoadWays;
//    private List<String> productTags;
    private long id; //物料ID
    private String productApplyRangeId; //物料分配范围ID
    private String defaultSKUId;
    private String productTemplate; //物料模板ID
    private long productClass; //商品分类ID
    private String manageClass_Name; //物料分类
    private long productApplyRange_productDetailId; //物料详情ID
    private String transType_Name; //物料类型名称
    private int realProductAttribute; //物料性质
    private int platFormStaus; //平台处理商家物料状态
    private String orgId; //管理组织ID
    private String unit_Name; //主计量单位
    private String pubts; //时间戳
    private String orgId_Name; //管理组织名称
    private String createDate; //创建日期
    private String creator; //创建人
    private String productClass_Code; //商品分类编码
    private String productApplyRange_OrgId_Name; //使用组织
    private String createTime; //	创建时间
    private String masterOrgKeyField;
    private String modifier;
    private String source;
    private String modifyTime;
    private String modifyDate;
    private int unitUseType;
    private long unit;
    private String transType;
    private String orgId_Code;
    private String productTemplate_Name;
    private String productFamily;
    private String code;
    private int realProductAttributeType;
    private String productApplyRange_OrgId;
    private int salesAndOperations;
    private String productClass_Name;
    private long manageClass;
    private int productSkuSaveAsync;
    private String manageClass_Code;
    private String transTypeKeyField;

    private String isRegistrationManager;
    private String isAuthorizationManager;
    private String enableAssistUnit;
    private ProductDetailBean detail;
    private TimeBean time;

    //订阅完善扩展字段
//    private String tenantId;
//    private String eventNotify_status;
//    private String isEnabled;
//    private String isStop;
//    private String isCreator;
//    private String hasSpecs;
//    private String modifierId;
//    private String barCode;


    public String getIsRegistrationManager() {
        return isRegistrationManager;
    }

    public void setIsRegistrationManager(String isRegistrationManager) {
        this.isRegistrationManager = isRegistrationManager;
    }

    public String getIsAuthorizationManager() {
        return isAuthorizationManager;
    }

    public void setIsAuthorizationManager(String isAuthorizationManager) {
        this.isAuthorizationManager = isAuthorizationManager;
    }

    public String getEnableAssistUnit() {
        return enableAssistUnit;
    }

    public void setEnableAssistUnit(String enableAssistUnit) {
        this.enableAssistUnit = enableAssistUnit;
    }

    public List<ProductOrgBean> getProductOrgs() {
        return productOrgs;
    }

    public void setProductOrgs(List<ProductOrgBean> productOrgs) {
        this.productOrgs = productOrgs;
    }

    public List<UnitassistEntity> getProductAssistUnitExchanges() {
        return productAssistUnitExchanges;
    }

    public void setProductAssistUnitExchanges(List<UnitassistEntity> productAssistUnitExchanges) {
        this.productAssistUnitExchanges = productAssistUnitExchanges;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getProductApplyRangeId() {
        return productApplyRangeId;
    }

    public void setProductApplyRangeId(String productApplyRangeId) {
        this.productApplyRangeId = productApplyRangeId;
    }

    public String getDefaultSKUId() {
        return defaultSKUId;
    }

    public void setDefaultSKUId(String defaultSKUId) {
        this.defaultSKUId = defaultSKUId;
    }

    public String getProductTemplate() {
        return productTemplate;
    }

    public void setProductTemplate(String productTemplate) {
        this.productTemplate = productTemplate;
    }

    public long getProductClass() {
        return productClass;
    }

    public void setProductClass(long productClass) {
        this.productClass = productClass;
    }

    public String getManageClass_Name() {
        return manageClass_Name;
    }

    public void setManageClass_Name(String manageClass_Name) {
        this.manageClass_Name = manageClass_Name;
    }

    public long getProductApplyRange_productDetailId() {
        return productApplyRange_productDetailId;
    }

    public void setProductApplyRange_productDetailId(long productApplyRange_productDetailId) {
        this.productApplyRange_productDetailId = productApplyRange_productDetailId;
    }

    public String getTransType_Name() {
        return transType_Name;
    }

    public void setTransType_Name(String transType_Name) {
        this.transType_Name = transType_Name;
    }

    public int getRealProductAttribute() {
        return realProductAttribute;
    }

    public void setRealProductAttribute(int realProductAttribute) {
        this.realProductAttribute = realProductAttribute;
    }

    public int getPlatFormStaus() {
        return platFormStaus;
    }

    public void setPlatFormStaus(int platFormStaus) {
        this.platFormStaus = platFormStaus;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getUnit_Name() {
        return unit_Name;
    }

    public void setUnit_Name(String unit_Name) {
        this.unit_Name = unit_Name;
    }

    public String getPubts() {
        return pubts;
    }

    public void setPubts(String pubts) {
        this.pubts = pubts;
    }

    public String getOrgId_Name() {
        return orgId_Name;
    }

    public void setOrgId_Name(String orgId_Name) {
        this.orgId_Name = orgId_Name;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getProductClass_Code() {
        return productClass_Code;
    }

    public void setProductClass_Code(String productClass_Code) {
        this.productClass_Code = productClass_Code;
    }

    public String getProductApplyRange_OrgId_Name() {
        return productApplyRange_OrgId_Name;
    }

    public void setProductApplyRange_OrgId_Name(String productApplyRange_OrgId_Name) {
        this.productApplyRange_OrgId_Name = productApplyRange_OrgId_Name;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getMasterOrgKeyField() {
        return masterOrgKeyField;
    }

    public void setMasterOrgKeyField(String masterOrgKeyField) {
        this.masterOrgKeyField = masterOrgKeyField;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(String modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(String modifyDate) {
        this.modifyDate = modifyDate;
    }

    public int getUnitUseType() {
        return unitUseType;
    }

    public void setUnitUseType(int unitUseType) {
        this.unitUseType = unitUseType;
    }

    public long getUnit() {
        return unit;
    }

    public void setUnit(long unit) {
        this.unit = unit;
    }

    public String getTransType() {
        return transType;
    }

    public void setTransType(String transType) {
        this.transType = transType;
    }

    public String getOrgId_Code() {
        return orgId_Code;
    }

    public void setOrgId_Code(String orgId_Code) {
        this.orgId_Code = orgId_Code;
    }

    public String getProductTemplate_Name() {
        return productTemplate_Name;
    }

    public void setProductTemplate_Name(String productTemplate_Name) {
        this.productTemplate_Name = productTemplate_Name;
    }

    public String getProductFamily() {
        return productFamily;
    }

    public void setProductFamily(String productFamily) {
        this.productFamily = productFamily;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public int getRealProductAttributeType() {
        return realProductAttributeType;
    }

    public void setRealProductAttributeType(int realProductAttributeType) {
        this.realProductAttributeType = realProductAttributeType;
    }

    public String getProductApplyRange_OrgId() {
        return productApplyRange_OrgId;
    }

    public void setProductApplyRange_OrgId(String productApplyRange_OrgId) {
        this.productApplyRange_OrgId = productApplyRange_OrgId;
    }

    public int getSalesAndOperations() {
        return salesAndOperations;
    }

    public void setSalesAndOperations(int salesAndOperations) {
        this.salesAndOperations = salesAndOperations;
    }

    public String getProductClass_Name() {
        return productClass_Name;
    }

    public void setProductClass_Name(String productClass_Name) {
        this.productClass_Name = productClass_Name;
    }

    public long getManageClass() {
        return manageClass;
    }

    public void setManageClass(long manageClass) {
        this.manageClass = manageClass;
    }

    public int getProductSkuSaveAsync() {
        return productSkuSaveAsync;
    }

    public void setProductSkuSaveAsync(int productSkuSaveAsync) {
        this.productSkuSaveAsync = productSkuSaveAsync;
    }

    public String getManageClass_Code() {
        return manageClass_Code;
    }

    public void setManageClass_Code(String manageClass_Code) {
        this.manageClass_Code = manageClass_Code;
    }

    public String getTransTypeKeyField() {
        return transTypeKeyField;
    }

    public void setTransTypeKeyField(String transTypeKeyField) {
        this.transTypeKeyField = transTypeKeyField;
    }

    public ProductDetailBean getDetail() {
        return detail;
    }

    public void setDetail(ProductDetailBean detail) {
        this.detail = detail;
    }

    public TimeBean getTime() {
        return time;
    }

    public void setTime(TimeBean time) {
        this.time = time;
    }


    private Object name;

    public String getName() {
        if (name == null) return null;
        if (name instanceof Object) {
            NameBean obj = null;
            try {
                obj = JSONObject.parseObject(JSONObject.toJSONString(name), NameBean.class);
            } catch (Exception ex) {
            }
            if (obj != null)
                return obj.getZh_CN();
            else return name.toString();
        } else return name.toString();
    }

    public void setName(Object name) {
        NameBean obj = new NameBean();
        if (name instanceof String) {
            obj.setZh_CN(name.toString());
        } else {
            obj = JSONObject.parseObject(JSONObject.toJSONString(name), NameBean.class);
        }
        this.name = obj;
    }
}
